<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>v-if-else</title>
    <script type="text/javascript" src="js/vue.js"></script>
</head>
<body>
    <div id="app">
        <div v-if="age>=18">成年人</div>
        <div v-else>未成年人</div>
        <div v-show="flag">asdfaweaf</div>
        
    </div>
</body>
</html>
<script>
    var vm=new Vue({
        el:'#app',
        data:{
            age:19,
            flag:false
        }
    });
</script>